1. Field of the Invention
The invention relates to non-volatile memories, and more particularly to usable lifespan measurement, performance capability estimation and in-system programming code replacement of the non-volatile memories, and data storage systems using the same system.
2. Description of the Related Art
A non-volatile memory that can retain stored information without power supply, such as a flash memory, is commonly used in a variety of consumer electronic devices, including mobile phones, digital cameras, personal digital assistants (PDAs) and so on. In general, the non-volatile memory is well suited for consumer electronic devices for its small size, high memory density, low power consumption and low cost features. Thus, the non-volatile memory, e.g., an NAND flash, may be packaged into different storage media, such as a compact flash (CF) card, multimedia card (MMC), secure digital (SD) card, and solid state disks (SSD), etc.
Generally, non-volatile memory, such as a flash memory, is formed by a large number of blocks each comprises a plurality of pages for data storage. Further, the flash memory is programmed by a unit of a page and erased by a unit of a block. When a block which has stored data therein attempts to update the stored data, the used block must be erased before being re-used or updated. This is because data can only be written into a page where no data is stored or to a page which has been erased, and the flash memory cannot be erased by a unit of a page.
However, each of the erasable blocks has a limited number of erase cycles; this causes the non-volatile memory to have a limited useable lifespan. As time passes, the usable lifespan of the non-volatile memory becomes exhausted and it may no longer be programmed or erased properly so as to degrade the entire performance capability of the non-volatile memory.
Therefore, it is desirable to provide a real-time update of the usable lifespan and performance capability for the non-volatile memory. In addition, it is desirable to give prompt notification of a situation where the usable lifespan is about to expire or when the performance capability degradation becomes critical, so that appropriate actions can be taken in advance, such as replacing the in-system programming code of the non-volatile memory or backing up data stored thereon.